#include "calClient.hpp"

#include <memory>

using namespace std;
using namespace client;

static void Usage(const std::string proc)
{
    std::cerr << "Usage:\n\t" << proc << "serverip serverport\n\n";
}

// ./calClient serverip serverport
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }

    string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]);

    std::unique_ptr<calClient> tcli(new calClient(serverip, serverport));
    tcli->initClient();
    tcli->start();

    return 0;
}